﻿using Admin.Core.Common.BaseModel;
using Admin.Core.Model.Admin;
using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace Admin.Core.Model.Xsproject
{
    /// <summary>
    /// 项目任务
    /// </summary>
    [Table(Name = "XS_TASKITEM")]
    public class TaskItemEntity : EntityAdd, IEntitySoftDelete
    {
        /// <summary>
        /// 任务code
        /// </summary>
        [Column(Name = "TASKID")]
        public long TaskId { get; set; }
        public DictionaryEntity Task { get; set; }

        /// <summary>
        /// 项目code
        /// </summary>
        [Column(Name = "PROJECTID")]
        public long ProjectId { get; set; }
        public ProjectEntity Project { get; set; }
        /// <summary>
        /// 计划开始实际
        /// </summary>
        [Column(Name = "PLANBEGINDATE")]
        public DateTime? PlanBeginDate { get; set; }

        /// <summary>
        /// 计划结束实际
        /// </summary>
        [Column(Name = "PLANENDDATE")]
        public DateTime? PlanEndDate { get; set; }


        /// <summary>
        /// 实际开始实际
        /// </summary>
        [Column(Name = "ACTUALBEGINDATE")]
        public DateTime? ActualBeginDate { get; set; }

        /// <summary>
        /// 实际结束实际
        /// </summary>
        [Column(Name = "ACTUALENDDATE")]
        public DateTime? ActualEndDate { get; set; }


        /// <summary>
        /// 任务完成进度
        /// </summary>
        [Column(Name = "PROGRESS")]
        public decimal Progress { get; set; }



        /// <summary>
        /// 任务状态  0 待处理  1 处理中  2 已完成
        /// </summary>
        [Column(Name = "TASKFLAG")]
        public int? TaskFlag { get; set; }


        /// <summary>
        /// 备注
        /// </summary>
        [Column(Name = "REMARK")]//
        public string Remark { get; set; }
        /// <summary>
        /// 父级数据的id
        /// </summary>
        [Column(Name = "PARENTID")]
        public long? ParentId { get; set; }

        /// <summary>
        /// 父对象
        /// </summary>
        public TaskItemEntity Parent { get; set; }


        /// <summary>
        /// 责任人
        /// </summary>
        [Column(Name = "RESPONID")]
        public long? ResponId { get; set; }
        public UserEntity Respon { get; set; }

        /// <summary>
        /// 阶段状态  -1未就绪  0待处理   1进行中， 2已完成
        /// </summary>
        [Column(Name = "STATUS")]
        public int? Status { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        [Description("是否删除")]
        [Column(Name = "ISDELETED")]//
        public bool IsDeleted { get; set; } = false;

        /// <summary>
        /// 阶段排序
        /// </summary>
        [Description("阶段排序")]
        [Column(Name = "SORT")]
        public int? Sort { get; set; }

        /// <summary>
        /// 阶段排序
        /// </summary>
        [Description("流程顺序")]
        [Column(Name = "FLOWID")]
        public int? FlowId { get; set; }
    }
}
